<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/bizappproject/app_wgjy/materialfactorycost.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/bizappproject/app_wgjy/materialfactorycost.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        name: "materialfactorycost",
        setup() {
            const table = ref({
                key: "Id",
                footer: "Foots",
                cnName: "成本数据管理",
                name: "app_wgjy/materialfactorycost",
                newTabEdit: false,
                url: "/materialfactorycost/",
                sortName: "Id"
            });
            const editFormFields = ref({"Level":"","DataType":"","DateLevel":"","Data":"","ToalProduc":"","TotalCost":"","PerCost":"","Energe":"","PerEng":"","NGas":"","YGas":"","PerGas":"","Perstime":"","PerPeo":""});
            const editFormOptions = ref([[{"dataKey":"COST","data":[],"title":"厂级/工段级","field":"Level","type":"select"},
                               {"dataKey":"CostModel","data":[],"title":"模块类型","field":"DataType","type":"select"},
                               {"dataKey":"CostDataType","data":[],"title":"月度/日度","field":"DateLevel","type":"select"},
                               {"title":"几月/几月几日","field":"Data","type":"date"},
                               {"title":"产量","field":"ToalProduc","type":"decimal"}],
                              [{"title":"总成本","field":"TotalCost","type":"decimal"},
                               {"title":"单公斤成本","field":"PerCost","type":"decimal"}],
                              [{"title":"电耗","field":"Energe","type":"decimal"},
                               {"title":"单公斤电耗","field":"PerEng","type":"decimal"}],
                              [{"title":"氮气","field":"NGas","type":"decimal"},
                               {"title":"氩气","field":"YGas","type":"decimal"},
                               {"title":"单位消耗量","field":"PerGas","type":"decimal"}],
                              [{"title":"人员工时","field":"Perstime","type":"decimal"},
                               {"title":"人均效率","field":"PerPeo","type":"decimal"}]]);
            const searchFormFields = ref({"Level":""});
            const searchFormOptions = ref([[{"dataKey":"COST","data":[],"title":"厂级/工段级","field":"Level","type":"like"}]]);
            const columns = ref([{field:"Level",title:"厂级/工段级",type:"string",bind:{ key:"COST",data:[]},width:120,showOverflowTooltip:true,align:"left"},
                       {field:"DataType",title:"模块类型",type:"string",bind:{ key:"CostModel",data:[]},width:120,showOverflowTooltip:true,align:"left"},
                       {field:"DateLevel",title:"月度/日度",type:"string",bind:{ key:"CostDataType",data:[]},width:120,showOverflowTooltip:true,align:"left"},
                       {field:"Data",title:"几月/几月几日",type:"datetime",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"TotalCost",title:"总成本",type:"float",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"ToalProduc",title:"产量",type:"float",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"PerCost",title:"单公斤成本",type:"float",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"Energe",title:"电耗",type:"float",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"PerEng",title:"单公斤电耗",type:"float",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"NGas",title:"氮气",type:"float",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"YGas",title:"氩气",type:"float",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"PerGas",title:"单位消耗量",type:"float",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"Perstime",title:"人员工时",type:"float",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"PerPeo",title:"人均效率",type:"float",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"Id",title:"键",type:"bigint",width:110,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效(0:否,1:是)",type:"int",width:110,hidden:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建人ID",type:"bigint",width:80,hidden:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人名",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改人ID",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人名",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
